package com.aikon.wht.io;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.RandomAccessFile;

public class TestOfRandomAccessFile {

    public static void main(String[] args) throws IOException {
        File f = new File("./tmp.txt");
        RandomAccessFile raf = new RandomAccessFile(f,"rw");
        System.out.println(raf.getFilePointer());
        raf.seek(0L);
        raf.writeBytes("123");
        raf.seek(1);
        raf.writeBytes("abc");

    }
}
